package cn.sciento.onelink.sim.aggregative.member.voice.roster;

import cn.sciento.onelink.CommonResponse;
import cn.sciento.onelink.LinkRequest;
import cn.sciento.onelink.utils.ParamUtil;
import cn.sciento.onelink.utils.TransIdUtil;
import lombok.Builder;
import lombok.Data;

import java.util.HashMap;

/**
 * 成员语音白名单查询
 * @author waltonlee
 */
@Data
@Builder
public class SimMemberVoiceWhitelistRequest extends LinkRequest<CommonResponse<SimMemberVoiceWhitelistResult>> {
    private String appId;
    private String token;
    private String msisdn;
    private String iccid;
    private String imsi;
    private String groupId;

    public SimMemberVoiceWhitelistRequest(String appId, String token, String msisdn, String iccid, String imsi, String groupId) {
        super(Method.GET);
        this.appId = appId;
        this.token = token;
        this.msisdn = msisdn;
        this.iccid = iccid;
        this.imsi = imsi;
        this.groupId = groupId;
        this.path = "/ec/query/member-voice-whitelist";
        HashMap<String, Object> bodyMap = new HashMap<String, Object>();
        bodyMap.put("transid", TransIdUtil.generate(appId));
        bodyMap.put("token",token);
        bodyMap.put("groupId",groupId);
        bodyMap.putAll(ParamUtil.paramJudge(msisdn,iccid,imsi));
        this.setCompleteUrl(this.path,bodyMap);
    }
}
